package com.benmei.ntlive.common;

import com.benmei.ntlive.utils.JsonUtil;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * Created by Peter on 2017/8/21.
 */
public class ErrorResult {
    private Long timestamp = System.currentTimeMillis();
    private Integer status;
    private String message;
    private String action;

    public ErrorResult(Integer status, String message, String action) {
        this.status = status;
        this.message = message;
        this.action = action;
    }

    public Long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    @JsonIgnore
    public String toJson() {
        return JsonUtil.toJson(this);
    }
}
